// vite.config.js
import { defineConfig, loadEnv } from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/vite/dist/node/index.js";
import path3 from "path";

// vite/plugins/index.js
import vue from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/@vitejs/plugin-vue/dist/index.mjs";

// vite/plugins/auto-import.js
import autoImport from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/unplugin-auto-import/dist/vite.js";
function createAutoImport() {
  return autoImport({
    imports: [
      "vue",
      "vue-router",
      "pinia"
    ],
    dts: false
  });
}

// vite/plugins/svg-icon.js
import { createSvgIconsPlugin } from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import path from "path";
function createSvgIcon(isBuild) {
  return createSvgIconsPlugin({
    iconDirs: [path.resolve(process.cwd(), "src/assets/icons/svg")],
    symbolId: "icon-[dir]-[name]",
    svgoOptions: isBuild
  });
}

// vite/plugins/compression.js
import compression from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/vite-plugin-compression/dist/index.mjs";
function createCompression(env) {
  const { VITE_BUILD_COMPRESS } = env;
  const plugin = [];
  if (VITE_BUILD_COMPRESS) {
    const compressList = VITE_BUILD_COMPRESS.split(",");
    if (compressList.includes("gzip")) {
      plugin.push(
        compression({
          ext: ".gz",
          deleteOriginFile: false
        })
      );
    }
    if (compressList.includes("brotli")) {
      plugin.push(
        compression({
          ext: ".br",
          algorithm: "brotliCompress",
          deleteOriginFile: false
        })
      );
    }
  }
  return plugin;
}

// vite/plugins/setup-extend.js
import setupExtend from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/unplugin-vue-setup-extend-plus/dist/vite.js";
function createSetupExtend() {
  return setupExtend({});
}

// vite/plugins/cesium.js
import { viteStaticCopy } from "file:///D:/Projects/MergeTwins30/RuoYi-Wvp-%E6%98%9F%E7%90%83%E7%89%88/ruoyi-ui-vue3/node_modules/vite-plugin-static-copy/dist/index.js";
import path2 from "path";
import fs from "fs";
var __vite_injected_original_dirname = "D:\\Projects\\MergeTwins30\\RuoYi-Wvp-\u661F\u7403\u7248\\ruoyi-ui-vue3\\vite\\plugins";
function createCesiumPlugin() {
  const cesiumPath = path2.resolve(__vite_injected_original_dirname, "../../node_modules/cesium/Build/Cesium");
  const targets = [];
  if (fs.existsSync(path2.join(cesiumPath, "Workers"))) {
    targets.push({
      src: path2.join(cesiumPath, "Workers"),
      dest: "cesium"
    });
  }
  if (fs.existsSync(path2.join(cesiumPath, "ThirdParty"))) {
    targets.push({
      src: path2.join(cesiumPath, "ThirdParty"),
      dest: "cesium"
    });
  }
  if (fs.existsSync(path2.join(cesiumPath, "Assets"))) {
    targets.push({
      src: path2.join(cesiumPath, "Assets"),
      dest: "cesium"
    });
  }
  return viteStaticCopy({ targets });
}

// vite/plugins/index.js
function createVitePlugins(viteEnv, isBuild = false) {
  const vitePlugins = [vue()];
  vitePlugins.push(createAutoImport());
  vitePlugins.push(createSetupExtend());
  vitePlugins.push(createSvgIcon(isBuild));
  vitePlugins.push(createCesiumPlugin());
  isBuild && vitePlugins.push(...createCompression(viteEnv));
  return vitePlugins;
}

// vite.config.js
var __vite_injected_original_dirname2 = "D:\\Projects\\MergeTwins30\\RuoYi-Wvp-\u661F\u7403\u7248\\ruoyi-ui-vue3";
var vite_config_default = defineConfig(({ mode, command }) => {
  const env = loadEnv(mode, process.cwd());
  const { VITE_APP_ENV } = env;
  return {
    base: VITE_APP_ENV === "production" ? "/" : "/",
    plugins: createVitePlugins(env, command === "build"),
    resolve: {
      alias: {
        "~": path3.resolve(__vite_injected_original_dirname2, "./"),
        "@": path3.resolve(__vite_injected_original_dirname2, "./src")
      },
      extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"]
    },
    define: {
      // Define Cesium base URL for development
      CESIUM_BASE_URL: JSON.stringify("/node_modules/cesium/Build/Cesium/")
    },
    server: {
      port: 80,
      host: true,
      open: true,
      proxy: {
        // 移植的代理配置
        "/RPC2_Login": {
          target: "http://172.3.101.2:80",
          changeOrigin: true,
          secure: false
        },
        "/RPC2": {
          target: "http://172.3.101.2:80",
          changeOrigin: true,
          secure: false
        },
        "/RPC_Loadfile": {
          target: "http://172.3.101.2:80",
          changeOrigin: true,
          secure: false
        },
        "/web_caps": {
          target: "http://172.3.101.2:80",
          changeOrigin: true,
          secure: false
        },
        // 保留原有的开发API代理 - 指向Python后端
        "/dev-api": {
          target: "http://localhost:8000",
          changeOrigin: true,
          rewrite: (p) => p.replace(/^\/dev-api/, "")
        }
      }
    },
    css: {
      postcss: {
        plugins: [
          {
            postcssPlugin: "internal:charset-removal",
            AtRule: {
              charset: (atRule) => {
                if (atRule.name === "charset") {
                  atRule.remove();
                }
              }
            }
          }
        ]
      }
    },
    // 如果需要worker-loader功能，Vite有内置支持
    worker: {
      format: "es",
      // 或 'iife'
      plugins: []
    },
    build: {
      // 如果需要排除worker文件
      rollupOptions: {
        output: {
          manualChunks: void 0
        }
        // external: [/\.worker\.js$/] // 如果需要排除worker文件
      }
    },
    // Copy Cesium assets
    assetsInclude: ["**/*.gltf", "**/*.glb", "**/*.b3dm"]
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiLCAidml0ZS9wbHVnaW5zL2luZGV4LmpzIiwgInZpdGUvcGx1Z2lucy9hdXRvLWltcG9ydC5qcyIsICJ2aXRlL3BsdWdpbnMvc3ZnLWljb24uanMiLCAidml0ZS9wbHVnaW5z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ly8vRDovUHJvamVjdHMvTWVyZ2VUd2luczMwL1J1b1lpLVd2cC0lRTYlOTglOUYlRTclOTAlODMlRTclODklODgvcnVveWktdWktdnVlMy92aXRlL3BsdWdpbnMvY29tcHJlc3Npb24uanNcIjtpbXBvcnQgY29tcHJlc3Npb24gZnJvbSAndml0ZS1wbHVnaW4tY29tcHJlc3Npb24nXHJcblxyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjcmVhdGVDb21wcmVzc2lvbihlbnYpIHtcclxuICAgIGNvbnN0IHsgVklURV9CVUlMRF9DT01QUkVTUyB9ID0gZW52XHJcbiAgICBjb25zdCBwbHVnaW4gPSBbXVxyXG4gICAgaWYgKFZJVEVfQlVJTERfQ09NUFJFU1MpIHtcclxuICAgICAgICBjb25zdCBjb21wcmVzc0xpc3QgPSBWSVRFX0JVSUxEX0NPTVBSRVNTLnNwbGl0KCcsJylcclxuICAgICAgICBpZiAoY29tcHJlc3NMaXN0LmluY2x1ZGVzKCdnemlwJykpIHtcclxuICAgICAgICAgICAgLy8gaHR0cDovL2RvYy5ydW95aS52aXAvcnVveWktdnVlL290aGVyL2ZhcS5odG1sI1x1NEY3Rlx1NzUyOGd6aXBcdTg5RTNcdTUzOEJcdTdGMjlcdTk3NTlcdTYwMDFcdTY1ODdcdTRFRjZcclxuICAgICAgICAgICAgcGx1Z2luLnB1c2goXHJcbiAgICAgICAgICAgICAgICBjb21wcmVzc2lvbih7XHJcbiAgICAgICAgICAgICAgICAgICAgZXh0OiAnLmd6JyxcclxuICAgICAgICAgICAgICAgICAgICBkZWxldGVPcmlnaW5GaWxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgKVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcHJlc3NMaXN0LmluY2x1ZGVzKCdicm90bGknKSkge1xyXG4gICAgICAgICAgICBwbHVnaW4ucHVzaChcclxuICAgICAgICAgICAgICAgIGNvbXByZXNzaW9uKHtcclxu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